module.exports = {
  apps: [{
    name: 'esconfig',
    script: './index.js',
    // Options reference: https://pm2.keymetrics.io/docs/usage/application-declaration/
    watch: false,
    env: {
      NODE_ENV: 'development'
    },
    env_production: {
      NODE_ENV: 'production'
    }
  }],

  deploy: {
    production: {
      user: 'root',
      host: '47.98.161.133',
      ref: 'origin/master',
      repo: 'git@gitee.com:zwzjoker/esconfig.git',
      path: '/web/test',
      'post-deploy': 'npm install && pm2 reload ecosystem.config.js --env production'
    }
  }
};
